package bargain.server.lunch;

import bargain.server.service.TransferService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @ClassName GargainLunch
 * @Description
 * @Author Jingxiao.Ye
 * @Date 2022/1/4 下午10:00
 * @Version V1.0
 * @Since JDK 11
 */
@Component
public class BargainLunch implements ApplicationRunner {

    @Autowired
    private TransferService transferService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        long accountIdA = 1L;
        long accountIdB = 2L;
        transferService.transfer(accountIdA,accountIdB,BigDecimal.valueOf(7),BigDecimal.valueOf(1));
    }

}
